<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*,java.util.*,vo.*,utils.*" errorPage="" %>
<%
	TblCustomer tc=(TblCustomer)request.getAttribute("Customer");	
	if(tc==null){
		out.print("Error,can't get infomation about customer!");
		return;
	}
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>处理返回信息</title>
<SCRIPT language="javascript" src="/script/tools_1.js"></SCRIPT>
<script>
function process(){
	parent.showList.innerHTML=document.body.innerHTML;
	parent.form1.type.value="";
	parent.form1.price.value="";
	parent.form1.productId.value="";
}
</script>
</head>

<body onload="process()">
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
				<tr><td class="table_item" width=75 >客户名称</td>
				<td class="table_content"><%=tc.getName()%></td>
				</tr>
				<tr><td class="table_item">操作</td>
				<td class="table_content"><input type="button" class="button" value="返回" onClick="backPage()" /></td>
				</tr>
			</table>
			<script>createTitle("客户的产品列表");</script>
			<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="seachlist">
				<thead>
				  <tr class="seachlist">
					<th >产品名称</th>					
					<th >产品类型</th>
					<th >参考价格</th>
					<th>操作</th>
				  </tr>
				</thead>
				<tbody>
				<%
				List list=(List)request.getAttribute("result");
				if(list!=null){
					TblCustomerProduct tcp;
					for(int i=0;i<list.size();i++){
						tcp=(TblCustomerProduct)list.get(i);
						%>
						<tr class="seachlist_td1">
							<td><%=BussUtil.getNameById("name","Product","id",tcp.getId().getProductId()+"")%></td>
							<td><%=HtmlUtil.noNull(tcp.getType())%></td>
							<td><%=HtmlUtil.noNull(tcp.getPrice())%></td>		
							<td><a href="javascript:editProduct(<%=tcp.getId().getProductId()%>)"><img src="/images/cmdEdit.gif" />修改</a>&nbsp;&nbsp;
								<a href="javascript:delProduct(<%=tcp.getId().getProductId()%>)"><img src="/images/cmdDel.gif" />删除</a>
						</tr>
						<%					
					}				
				}
				%>
				</tbody>
			</table>
</body>
</html>
